package com.witframework.core.persistence;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DBUtil {
	public static void closeObject(Connection con, Statement stm, ResultSet rs) {
		try {
			rs.close();
		} catch (Exception e) {
		}
		try {
			stm.close();
		} catch (Exception e) {
		}
		try {
			con.close();
		} catch (Exception e) {
		}
	}

	public static void closeObject(Statement stm, ResultSet rs) {
		try {
			rs.close();
		} catch (Exception e) {
		}
		try {
			stm.close();
		} catch (Exception e) {
		}
	}

	public static void closeObject(Connection con, Statement stm) {
		try {
			stm.close();
		} catch (Exception e) {
		}
		try {
			con.close();
		} catch (Exception e) {
		}
	}

	public static void closeObject(Connection con, ResultSet rs) {
		try {
			rs.close();
		} catch (Exception e) {
		}
		try {
			con.close();
		} catch (Exception e) {
		}
	}

	public static void closeObject(Connection con) {
		try {
			con.close();
		} catch (Exception e) {
		}
	}

	public static void closeObject(Statement stm) {
		try {
			stm.close();
		} catch (Exception e) {
		}
	}
	
	
}
